No longer require crate-type = ["dylib"] on shader crates#477
No longer require crate-type = ["dylib"] on shader crates#477Firestar99 merged 6 commits intomainfrom
crate-type = ["dylib"] on shader crates#477Conversation
| profile, | ||
| ]); | ||
| if cargo_cmd_like_rustc { | ||
| cargo.args(["--crate-type", "dylib"]); |
There was a problem hiding this comment.
Could you include a comment for why we need dylib at all?
…o be set in Cargo.toml
b321943 to
d89aedd
Compare
|
Did another cleanup round, found some more crates that declare rust-gpu/crates/spirv-builder/src/lib.rs Lines 1026 to 1030 in d7681df |
|
From cargo apk repository about using
I don't think this affects us at all, since we're only ever building the |
|
I'll let @eddyb review as I am not sure of ramifications. |
|
They already approved, but looks like the APIs used in the action to install Vulkan SDK on Windows is not using tokens, so it exceeds rate limits sometimes, which prevented merging: https://github.com/Rust-GPU/rust-gpu/actions/runs/19971068746/job/57275658889 |
With this PR, you no longer need to declare the
crate-typein your shader crate.All shader crates can now remove the previously required declaration in
Cargo.tomlbelow:Changes
crate-typeto be set in your shader cratecargo buildtocargo rustc--crate-type=dylibrustcmostly just exposes additional rustc args for the target cratecargo <cmd>is configurableclippyorfmtclose #476
cargo-gpu
Rust-GPU/cargo-gpu#125
Needs to be updated after this PR is merged, and needs some fixups from other changes in master, so a simple cargo patch won't work.